package com.qiuyuliantu.base.service.impl;

import java.util.List;
import com.qiuyuliantu.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qiuyuliantu.base.mapper.QiuPlatformsMapper;
import com.qiuyuliantu.base.domain.QiuPlatforms;
import com.qiuyuliantu.base.service.IQiuPlatformsService;

/**
 * 平台Service业务层处理
 *
 * @author lmx
 * @date 2025-04-08
 */
@Service
public class QiuPlatformsServiceImpl implements IQiuPlatformsService
{
    @Autowired
    private QiuPlatformsMapper qiuPlatformsMapper;

    /**
     * 查询平台
     *
     * @param platformId 平台主键
     * @return 平台
     */
    @Override
    public QiuPlatforms selectQiuPlatformsByPlatformId(Long platformId)
    {
        return qiuPlatformsMapper.selectQiuPlatformsByPlatformId(platformId);
    }

    /**
     * 查询平台列表
     *
     * @param qiuPlatforms 平台
     * @return 平台
     */
    @Override
    public List<QiuPlatforms> selectQiuPlatformsList(QiuPlatforms qiuPlatforms)
    {
        return qiuPlatformsMapper.selectQiuPlatformsList(qiuPlatforms);
    }

    /**
     * 新增平台
     *
     * @param qiuPlatforms 平台
     * @return 结果
     */
    @Override
    public int insertQiuPlatforms(QiuPlatforms qiuPlatforms)
    {
        return qiuPlatformsMapper.insertQiuPlatforms(qiuPlatforms);
    }

    /**
     * 修改平台
     *
     * @param qiuPlatforms 平台
     * @return 结果
     */
    @Override
    public int updateQiuPlatforms(QiuPlatforms qiuPlatforms)
    {
        return qiuPlatformsMapper.updateQiuPlatforms(qiuPlatforms);
    }

    /**
     * 批量删除平台
     *
     * @param platformIds 需要删除的平台主键
     * @return 结果
     */
    @Override
    public int deleteQiuPlatformsByPlatformIds(Long[] platformIds)
    {
        return qiuPlatformsMapper.deleteQiuPlatformsByPlatformIds(platformIds);
    }

    /**
     * 删除平台信息
     *
     * @param platformId 平台主键
     * @return 结果
     */
    @Override
    public int deleteQiuPlatformsByPlatformId(Long platformId)
    {
        return qiuPlatformsMapper.deleteQiuPlatformsByPlatformId(platformId);
    }

    /**
     * 查询平台列表一级分类（不拦截公网访问）
     */
    @Override
    public List<String> selectFirstLeveList() {
        return qiuPlatformsMapper.selectFirstLeveList();
    }
}
